#ifndef SERIESINSTANCE_H
#define SERIESINSTANCE_H

#include <QString>
#include <QMap>
#include <QImage>
#include "dcmtk/dcmimgle/diutils.h"
class ImageInstance;

class SeriesInstance
{
public:
    explicit SeriesInstance();
    ~SeriesInstance();

    void setSeriesNum(const QString &serNum) { seriesNum = serNum; }
    bool insertImage(ImageInstance *image);
    bool hasImage(const QString &file);
    QString getPatientName() const;
    QString getModality() const;
    int getSeriesNumber() const;

    bool getPixelSpacing(double &px, double &py, int slice) const;
    QImage getInstancePixmap(int slice);
    const short *getInstanceInterData(int slice);
    const ushort **getRawVolume(const ushort **&volume, ulong &width, ulong &height, ulong &slice);

private:
    SeriesInstance(const SeriesInstance &);
    SeriesInstance &operator= (const SeriesInstance &);

    QString seriesNum;
    const ushort **rawPtr;
    QMap<int, ImageInstance*> imageMap;
};

#endif // SERIESINSTANCE_H
